﻿<Controls:SinacorWindow  x:Class="Sinacor.UI.Bovespa.ManutencaoOrdens.View.SmartClient.CasamentoPreBoletos" 
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
          xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
          mc:Ignorable="d"
          xmlns:Model="clr-namespace:Sinacor.UI.Bovespa.ManutencaoOrdens.Model;assembly=Sinacor.UI.Bovespa.ManutencaoOrdens.Model"
          xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
          xmlns:Validation="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient.Validation;assembly=Sinacor.Infra.UI.Controls"
          WindowStartupLocation="CenterScreen"
          AutoContentHeight="True" 
          AutoContentWidth="True"
          WindowState="Maximized" 
          Title="{DynamicResource Bovespa.Ordens.Label.CasamentoPreBoletos}" 
          ModulePlus="True"
          ModuleId="ORD">

    <Controls:SinacorExpanderContainer x:Name="ExpanderContainer"
                                       VerticalAlignment="Stretch">
        <Controls:SinacorScrollViewer HorizontalAlignment="Stretch" 
                                      VerticalAlignment="Stretch" 
                                      Width="Auto" 
                                      Height="Auto">
            <Controls:SinacorExpander Header="{DynamicResource Bovespa.Ordens.Label.Ordem}"
                                      IsExpanded="True"								
                                      AllowExpand="False" 
                                      ScrollViewer.VerticalScrollBarVisibility="Auto">
           
                <Grid HorizontalAlignment="Stretch" 
                      VerticalAlignment="Stretch">

                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="4" />
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="4"/>
                    <RowDefinition Height="250"/>
                    <RowDefinition Height="4"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Controls:SinacorGroupBox 			
                    VerticalAlignment="Top" 		
                    Margin="0,0,0,0" 		
                    Width="Auto"				
                    HorizontalAlignment="Stretch"	
					Grid.Row="0"				
                    Height="70">
                    <Grid>
                        <Controls:SinacorLabel 	HorizontalAlignment="Left" 									
                                                Content="{DynamicResource Bovespa.Ordens.Label.Pregao}" 				
                                                Width="65"
                                                HorizontalContentAlignment="Left"/>
                        <Controls:SinacorComboBox x:Name="CboDataOrdem"
                                                  HorizontalAlignment="Left"
                                                  Margin="0,25,0,0"
                                                  VerticalAlignment="Top"
                                                  Width="111"
                                                  IsRequired="True"
                                                  IsSynchronizedWithCurrentItem="True"
                                                  ItemsSource="{Binding Path=CalendarioPreBoleto}"
                                                  SelectedValuePath="DataPregao"
                                                  DisplayMemberPath="DataFormatada"
                                                  SelectedValue="{Binding Path=DataPregao}"/>
                        <Controls:SinacorLabel 	HorizontalAlignment="Left" 									
                                                Content="{DynamicResource Bovespa.Ordens.Label.Numero}" 									
                                                Width="70"											
                                                VerticalAlignment="Top"											
                                                Margin="115,0,0,0"											
                                                HorizontalContentAlignment="Left"/>
                        <Controls:SinacorTextBox x:Name="TxtNumeroOrdem"
                                        HorizontalAlignment="Left"													
                                                       VerticalAlignment="Top"													
                                                       TextWrapping="NoWrap"													
                                                       Width="75"													
                                                       Margin="115,25,0,0"													
                                                       IsEnabled="False"
                                                       Text="{Binding Path=Ordem.NumeroOrdem}" />
                        <Controls:SinacorInt32TextBox  x:Name="TxtNumeroOrdemSubSequencia"
                                                       HorizontalAlignment="Left"													
                                                       VerticalAlignment="Top"													
                                                       TextWrapping="NoWrap"													
                                                       Width="35"													
                                                       Margin="194,25,0,0"													
                                                       IsEnabled="False"
                                                       Value="{Binding Path=Ordem.NumeroOrdemSubSequencia}" 
                                                       Integers="10" />
                        <Controls:SinacorLabel 	HorizontalAlignment="Left" 									
                                                Content="{DynamicResource Bovespa.Ordens.Label.Apelido}" 									
                                                Width="65"											
                                                VerticalAlignment="Top"											
                                                Margin="240,0,0,0"											
                                                IsEnabled="True"											
                                                HorizontalContentAlignment="Left"/>
                        <Controls:SinacorTextBox  x:Name="TxtApelido"
                                                  HorizontalAlignment="Left"												
                                                  TextWrapping="NoWrap"												
                                                  Width="195"												
                                                  Margin="240,25,0,0"												
                                                  VerticalAlignment="Top"												
                                                  IsEnabled="False"
                                                  Text="{Binding Path=Ordem.ApelidoCliente}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.Natureza}" 				
                                               Width="70"
                                               Margin="445,0,0,0"
                                               VerticalAlignment="Top"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorTextBox  x:Name="TxtNatureza"
                                                  HorizontalAlignment="Left"												
                                                  Margin="445,25,0,0"												
                                                  VerticalAlignment="Top"												
                                                  Width="90"												
                                                  IsEnabled="False"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.Ativo}" 				
                                               Width="65"
                                               Margin="545,0,0,0"
                                               VerticalAlignment="Top"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorTextBox x:Name="TxtAtivo"
                                                 HorizontalAlignment="Left"
                                                 TextWrapping="NoWrap"
                                                 Width="140"
                                                 Margin="545,25,0,0"
                                                 VerticalAlignment="Top"
                                                 IsEnabled="False"
                                                 Text="{Binding Path=Ordem.Ativo}"/>
                    </Grid>
                </Controls:SinacorGroupBox>
                <Controls:SinacorExpander Header="{DynamicResource Bovespa.ManutencaoOrdens.Label.PreBoletos}"
                                          IsExpanded="True"								
                                          AllowExpand="False"
								          Grid.Row="2"
        								  MinHeight="180">
                    <Grid>
                        <Controls:SinacorDataGrid x:Name="DtgCasamentoPreBoleto"
                                                  AllowDelete="True"
                                                  AllowBeginInsert="True"
                                                  ItemsSource="{Binding Path=PreBoletos}"
                                                  IsSynchronizedWithCurrentItem="True"
                                                  InsertBegun="DtgCasamentoPreBoleto_InsertBegun"
                                                  UpdateBegun="DtgCasamentoPreBoleto_UpdateBegun"                                                            
                                                  SavingAll="DtgCasamentoPreBoleto_Saving"
                                                  ApplyingStyle="DtgCasamentoPreBoleto_ApplyingStyle"
                                                  HorizontalAlignment="Stretch" 		
                                                  VerticalAlignment="Stretch" 		                                                                                    
                                                  Margin="0,0,0,0"
										          Grid.Row="2">
                            <!-- ContextMenu -->
                            <Controls:SinacorDataGrid.ContextMenuTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <Controls:SinacorContextMenuItem Header="{DynamicResource Bovespa.Ordens.Label.Casamento}" 
                                                                         x:Name="menuCasamento"
                                                                         Click="menuCasamento_Click"
                                                                         Loaded="menuCasamento_Loaded"
                                                                         IsEnabled="{Binding Path=IsEnabledMenuCasamento, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}"
                                                                         CausesValidation="True"/>
                                        <Controls:SinacorContextMenuItem Header="{DynamicResource Bovespa.ManutencaoOrdens.Label.NegociosOrdem}" 
                                                                         x:Name="menuNegociosOrdem"
                                                                         Click="menuNegociosOrdem_Click"
                                                                         CausesValidation="True"/>
                                    </StackPanel>
                                </DataTemplate>
                            </Controls:SinacorDataGrid.ContextMenuTemplate>
                            <!-- Fim ContextMenu -->

                            <Controls:SinacorDataGrid.Columns>
                                <Controls:Column Name="QtdNegocios"
                                                 Title="Bovespa.Ordens.Label.QtdNegocio"
                                                 AllowInsert="True"
        					                     AllowUpdate="False"
                                                 CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}"
                                                 DisplayMemberPath="Quantidade"
                                                 Integers="12"
                                                 Decimals="4" 
                                                 StringFormat="n4">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorDecimalTextBox x:Name="TxtQtdNegocios" 
                                                                     Value="{Binding Path=Quantidade}"
                                                                     Integers="12" 
                                                                     Decimals="4"
                                                                     IsRequired="True"
                                                                     KeyDown="TxtQtdNegocios_KeyDown"
                                                                     RequiredErrorMessage="Bovespa.Ordens.ExceptionMessage.QuantidadeObrigatoria"/>
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>

                                <Controls:Column Name="Preco"
                                                 Title="Bovespa.Ordens.Label.Preco"
                                                 DisplayMemberPath="Preco"
                                                 AllowInsert="True"
        					                     AllowUpdate="False"
                                                 Integers="7"
                                                 Decimals="8"
                                                 StringFormat="n8"
                                                 CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorDecimalTextBox x:Name="TxtPreco" 
                                                                            Value="{Binding Path=Preco}"
                                                                            Integers="7"
                                                                            Decimals="8" 
                                                                            IsRequired="True"
                                                                            RequiredErrorMessage="Bovespa.Ordens.ExceptionMessage.PrecoObrigatorio"/>
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>

                                <Controls:Column Name="ContraParte"
                                                 Title="Bovespa.Ordens.Label.CParte"
                                                 DisplayMemberPath="ContraParte"                                         
                                                 AllowInsert="True"
        					                     AllowUpdate="False"
                                                 MaxLength="8"
                                                 CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorTextBox x:Name="TxtContraParte" 
                                                                     Text="{Binding Path=ContraParte}"
                                                                     MaxLength="8"
                                                                     IsRequired="True"
                                                                     RequiredErrorMessage="Bovespa.Ordens.ExceptionMessage.ContraParteObrigatoria"/>
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>
                                <Controls:Column Name="CAS"
                                                 Title="Bovespa.Ordens.Label.CAS"
                                                 DisplayMemberPath="Casamento" 
                                                 AllowInsert="True"
        					                     AllowUpdate="True"
                                                 CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorComboBox x:Name="cmbCasamento"  
                                                                      IsSynchronizedWithCurrentItem="True"
                                                                      SelectedValue="{Binding Path=Casamento}"
                                                                      ItemsSource="{Binding Path=TipoCasamento, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}" 
                                                                      IsRequired="True"
                                                                      RequiredErrorMessage="Bovespa.Ordens.Message.CasamentoObrigatorio"
                                                                      Width="100" />
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>

                                <Controls:Column Name="QtdCasada"
                                         Title="Bovespa.Ordens.Label.QtdCasada"
                                         DisplayMemberPath="QuantidadeCasada"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         Decimals="4" Integers="13" StringFormat="n4"/>

                                <Controls:Column Name="Estrategia"
                                         Title="Bovespa.Ordens.Label.Estrategia"
                                         DisplayMemberPath="Estrategia"                                         
                                         AllowInsert="True"
        					             AllowUpdate="True"
                                         CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorComboBox x:Name="cmbEstrategia"                                                                
                                                                IsSynchronizedWithCurrentItem="True"
                                                                SelectedValue="{Binding Path=Estrategia}"
                                                                ItemsSource="{Binding Path=TipoEstrategia, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}" 
                                                                IsRequired="True"
                                                                RequiredErrorMessage="Bovespa.Ordens.Message.EstrategiaObrigatoria"
                                                                Width="100" />
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>
                                <Controls:Column Name="Cambio"
                                         Title="Bovespa.Ordens.Label.Cambio"
                                         DisplayMemberPath="ValorCambio"                                         
                                         AllowInsert="True"
        					             AllowUpdate="True"
                                         Integers="4"
                                         Decimals="6" 
                                         StringFormat="n6"
                                         CellInsertTemplate="{Binding Path=CellUpdateTemplate, RelativeSource={RelativeSource Self}}">
                                    <Controls:Column.CellUpdateTemplate>
                                        <DataTemplate>
                                            <Controls:SinacorDecimalTextBox x:Name="TxtCambio" 
                                                                     Value="{Binding Path=ValorCambio}"
                                                                     Integers="4" 
                                                                     Decimals="6" 
                                                                     IsRequired="False"
                                                                     LostFocus="TxtCambio_LostFocus"
                                                                     RequiredErrorMessage="Bovespa.Ordens.ExceptionMessage.ValorCambioObrigatorio"/>
                                        </DataTemplate>
                                    </Controls:Column.CellUpdateTemplate>
                                </Controls:Column>
                                <Controls:Column Name="VolCambio"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         Title="Bovespa.Ordens.Label.VolumeCambio"
                                         Decimals="2" Integers="10" StringFormat="n2"
                                         DisplayMemberPath="VolumeCambio"/>

                            </Controls:SinacorDataGrid.Columns>
                        </Controls:SinacorDataGrid>
                    </Grid>
                </Controls:SinacorExpander>
                <Controls:SinacorExpander Header="{DynamicResource Bovespa.ManutencaoOrdens.Label.NegociosDisponiveis}"
                                  		  IsExpanded="True"								
                                  		  AllowExpand="False"
										  Grid.Row="4"
										  Height="250"
										  Visibility="Visible" 
										  Width="Auto">
                    <Grid>
                        <Controls:SinacorDataGrid HorizontalAlignment="Stretch" 
											      Margin="0,0,0,0" 
											      VerticalAlignment="Stretch" 
											      Width="Auto" 
											      Height="Auto" 
                                                  ItemsSource="{Binding Path=NegociosDisponiveis}"
                                                  SelectionMode="Extended"
											      x:Name="DtgNegociosDisponiveis">
                            <!-- ContextMenu -->
                            <Controls:SinacorDataGrid.ContextMenuTemplate>
                                <DataTemplate>
                                    <StackPanel>
                                        <Controls:SinacorContextMenuItem Header="{DynamicResource Bovespa.ManutencaoOrdens.Label.PreBoletoAuto}" 
                                    						         x:Name="menuPreboletoAutomatico"
                                             						 Click="menuPreboletoAutomatico_Click"
                                             						 Loaded="menuPreboletoAutomatico_Loaded"
                                             						 IsEnabled="{Binding Path=IsEnabledMenuCasamento, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:SinacorWindow}}}"
                                             						 CausesValidation="True"/>
                                    </StackPanel>
                                </DataTemplate>
                            </Controls:SinacorDataGrid.ContextMenuTemplate>
                            <!-- Fim ContextMenu -->
                            <Controls:SinacorDataGrid.Columns>
                                <Controls:Column Name="Data"
                                         Title="Bovespa.Ordens.Label.Data"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="DataPregao">
                                </Controls:Column>
                                <Controls:Column Name="Numero"
                                         Title="Bovespa.Ordens.Label.Numero"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Numero">
                                </Controls:Column>
                                <Controls:Column Name="Tipo"
                                         Title="Bovespa.Ordens.Label.Tipo"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Mercado">
                                </Controls:Column>
                                <Controls:Column Name="Ativo"
                                         Title="Bovespa.Ordens.Label.Ativo"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Codigo">
                                </Controls:Column>
                                <Controls:Column Name="CV"
                                         Title="Bovespa.Ordens.Label.CV"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="NaturezaOperacao">
                                </Controls:Column>
                                <Controls:Column Name="Quantidade"
                                         Title="Bovespa.Ordens.Label.Quantidade"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Quantidade">
                                </Controls:Column>
                                <Controls:Column Name="Saldo"
                                         Title="Bovespa.Ordens.Label.Saldo"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Saldo">
                                </Controls:Column>
                                <Controls:Column Name="Preco"
                                         Title="Bovespa.Ordens.Label.Preco"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Valor">
                                </Controls:Column>
                                <Controls:Column Name="Bolsa"
                                         Title="Bovespa.Ordens.Label.Bolsa"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Bolsa">
                                </Controls:Column>
                                <Controls:Column Name="Operador"
                                         Title="Bovespa.Ordens.Label.Operador"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Operador">
                                </Controls:Column>
                                <Controls:Column Name="Contraparte"
                                         Title="Bovespa.ManutencaoOrdens.Label.Contraparte"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="ContraParte">
                                </Controls:Column>
                                <Controls:Column Name="TotalParcial"
                                         Title="Bovespa.ManutencaoOrdens.Label.TotalParcial"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="SituacaoCasamento">
                                </Controls:Column>
                                <Controls:Column Name="Estrategia"
                                         Title="Bovespa.ManutencaoOrdens.Label.Estrategia"
                                         AllowInsert="False"
        					             AllowUpdate="False"
                                         DisplayMemberPath="Liquidacao">
                                </Controls:Column>
                            </Controls:SinacorDataGrid.Columns>
                        </Controls:SinacorDataGrid>
                    </Grid>
                </Controls:SinacorExpander>

                <Controls:SinacorGroupBox 			  Header="{DynamicResource Bovespa.Ordens.Label.Controle}"				
                                                      HorizontalAlignment="Stretch"				
                                                      Margin="0,0,0,0"				
                                                      VerticalAlignment="Top"
													  Grid.Row="6"				
                                                      Height="130"				
                                                      Width="Auto">
                    <Grid>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.QtDigitada}" 				
                                               Width="110"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtQtDigitada"
                                                        Integers="16"
                                                        Decimals="4"
                                                        HorizontalAlignment="Left"
                                                        Margin="0,21,0,0"
                                                        VerticalAlignment="Top"
                                                        Width="160"
                                                        TextWrapping="NoWrap"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=CamposControle.QuantidadeDigitada}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.PrecoMedio}" 				
                                               Width="100"
                                               VerticalAlignment="Top"
                                               Margin="165,0,0,0"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtPrecoMedio"
                                                        Integers="16"
                                                        Decimals="4"
                                                        HorizontalAlignment="Left"
                                                        VerticalAlignment="Top"
                                                        Width="175"
                                                        Text=""
                                                        TextWrapping="NoWrap"
                                                        Margin="165,21,0,0"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=CamposControle.PrecoMedio}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.Volume}" 				
                                               Width="75"
                                               VerticalAlignment="Top"
                                               Margin="345,0,0,0"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtVolume"
                                                        Integers="10"
                                                        Decimals="2"
                                                        VerticalAlignment="Top"
                                                        Width="Auto"
                                                        Text=""
                                                        TextWrapping="NoWrap"
                                                        Margin="345,21,0,0"
                                                        IsEnabled="False"
                                                        HorizontalAlignment="Left"
                                                        Value="{Binding Path=CamposControle.Volume}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.VlrMediaCambio}" 				
                                               Width="120"
                                               Margin="450,0,0,0"
                                               VerticalAlignment="Top"
                                               HorizontalContentAlignment="Left"/>

                        <Controls:SinacorDecimalTextBox x:Name="TxtVlrMediaCambio"
                                                        Integers="10"
                                                        Decimals="6"
                                                        VerticalAlignment="Top"
                                                        Width="140"
                                                        TextWrapping="NoWrap"
                                                        Margin="450,21,0,0"
                                                        HorizontalAlignment="Left"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=CamposControle.PrecoMedioCambio}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.VolumedoCambio}" 				
                                               Width="100"
                                               Margin="595,0,0,0"
                                               VerticalAlignment="Top"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtVolumedoCambio"
                                                        Integers="12"
                                                        Decimals="2"
                                                        VerticalAlignment="Top"
                                                        Width="120"
                                                        Text=""
                                                        TextWrapping="NoWrap"
                                                        Margin="595,21,0,0"
                                                        HorizontalAlignment="Left"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=CamposControle.VolumeCambio}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.QtdaOrdem}" 				
                                               Width="110"
                                               HorizontalContentAlignment="Left"
                                               Margin="0,46,0,0"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtQtdeOrdem"
                                                        Integers="16"
                                                        Decimals="4"
                                                        HorizontalAlignment="Left"
                                                        VerticalAlignment="Top"
                                                        Width="160"
                                                        TextWrapping="NoWrap"
                                                        Margin="0,67,0,0"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=Ordem.Quantidade}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.SaldoOrdem}" 				
                                               Width="100"
                                               VerticalAlignment="Top"
                                               Margin="165,46,0,0"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtSaldoOrdem"
                                                        Integers="16"
                                                        Decimals="4"
                                                        AcceptsNegative="true"
                                                        HorizontalAlignment="Left"
                                                        VerticalAlignment="Top"
                                                        Width="175"
                                                        TextWrapping="NoWrap"
                                                        Margin="165,67,0,0"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=CamposControle.SaldoOrdem}"/>
                        <Controls:SinacorLabel HorizontalAlignment="Left" 				
                                               Content="{DynamicResource Bovespa.Ordens.Label.QtdeADRAnexoIV}" 				
                                               Width="130"
                                               VerticalAlignment="Top"
                                               Margin="345,46,0,0"
                                               HorizontalContentAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtQtdeADRAnexoIV"
                                                        Integers="16"
                                                        Decimals="4"
                                                        VerticalAlignment="Top"
                                                        Width="175"
                                                        Text=""
                                                        TextWrapping="NoWrap"
                                                        Margin="345,67,0,0"
                                                        IsEnabled="False"
                                                        HorizontalAlignment="Left"
                                                        Value="{Binding Path=Ordem.QuantidadeAnexoIV}"/>
                        <Controls:SinacorLabel 				 Content="{DynamicResource Bovespa.Ordens.Label.QtdADRAnexoV}" 				
                                                             Width="Auto"
                                                             Margin="525,46,0,0"
                                                             VerticalAlignment="Top"
                                                             HorizontalContentAlignment="Left"
                                                             HorizontalAlignment="Left"/>
                        <Controls:SinacorDecimalTextBox x:Name="TxtQtdADRAnexoV"
                                                        Integers="16"
                                                        Decimals="4"
                                                        VerticalAlignment="Top"
                                                        Width="175"
                                                        Text=""
                                                        TextWrapping="NoWrap"
                                                        Margin="525,67,0,0"
                                                        HorizontalAlignment="Left"
                                                        IsEnabled="False"
                                                        Value="{Binding Path=Ordem.QuantidadeAnexoV}"/>

                    </Grid>
                </Controls:SinacorGroupBox>
                <Grid HorizontalAlignment="Left"				
                      Margin="0,0,0,0"					
                      Width="600"
					  Grid.Row="7"					
                      VerticalAlignment="Top"					
                      Height="25">
                    <Controls:SinacorLabel HorizontalAlignment="Left"
                                           Content="{DynamicResource Bovespa.Ordens.Label.Legenda}"
                                           HorizontalContentAlignment="Left"
                                           Width="75"/>
                    <Ellipse Fill="{DynamicResource BrushGridRowBusiness02}"
                             Stroke="{DynamicResource BrushGridRowBusiness10}"
                             HorizontalAlignment="Left"
                             Margin="90,0,0,0"
                             VerticalAlignment="Center"
                             Width="10"
                             Height="10"/>
                    <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness02}"
                                           HorizontalAlignment="Left"
                                           Width="80"
                                           Content="{DynamicResource Bovespa.Ordens.Label.Casado}"
                                           Margin="100,0,0,0"
                                           VerticalAlignment="Top"
                                           HorizontalContentAlignment="Left"/>
                    <Ellipse Fill="{DynamicResource BrushGridRowBusiness04}"
                             Stroke="{DynamicResource BrushGridRowBusiness10}"
                             HorizontalAlignment="Left"
                             Margin="220,0,0,0"
                             VerticalAlignment="Center"
                             Width="10"
                             Height="10"/>
                    <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness04}"
                                           HorizontalAlignment="Left"
                                           Width="140"
                                           Content="{DynamicResource Bovespa.Ordens.Label.ParcialmenteCasado}"
                                           Margin="230,0,0,4"
                                           VerticalAlignment="Stretch"
                                           HorizontalContentAlignment="Left"
                                           d:LayoutOverrides="Height"/>
                    <Ellipse Fill="{DynamicResource BrushGridRowBusiness06}"
                             Stroke="{DynamicResource BrushGridRowBusiness10}"
                             HorizontalAlignment="Left"
                             Margin="400,0,0,0"
                             VerticalAlignment="Center"
                             Width="10"
                             Height="10"/>
                    <Controls:SinacorLabel Foreground="{DynamicResource BrushGridRowBusiness06}"
                                           HorizontalAlignment="Left"
                                           Width="80"
                                           Content="{DynamicResource Bovespa.Ordens.Label.NaoCasado}"
                                           Margin="410,0,0,4"
                                           VerticalAlignment="Top"
                                           HorizontalContentAlignment="Left"/>
                </Grid>
            </Grid>

        </Controls:SinacorExpander>
        </Controls:SinacorScrollViewer>
    </Controls:SinacorExpanderContainer>

</Controls:SinacorWindow>